package com.bfl.dubbo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.bfl.dubbo.entity.User;
import com.bfl.dubbo.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Reference
    private UserService service;

    @RequestMapping("/save")
    public Object saveUser() {

        User user = new User();
        user.setUsername("dubbo");
        user.setPassword("123456");

        return service.saveUser(user);
    }
}